package com.itxiuyixiu.homework.entity.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author 黄磊
 * @date 2020/3/6
 */
@Entity
public class Admin implements Serializable {
    @Id
    private String username;

    @Column(nullable = false)
    private String password;

    @Column(nullable = false)
    private String authorities;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAuthorities() {
        return authorities;
    }

    public void setAuthorities(String authorities) {
        this.authorities = authorities;
    }

    public void addAuthorities(String authorities) {
        this.authorities = "," + authorities;
    }
}
